//
// Created by francklinson on 2021/7/24 AT 22:54.
//
#include <vector>
#include <iostream>


using namespace std;

class Solution {
public:
    double largestTriangleArea(vector<vector<int>> &points) {
        double maxArea = 0;
        unsigned int N = points.size();
        for (int i = 0; i < N; i++)
            for (int j = i + 1; j < N; j++)
                for (int k = j + 1; k < N; k++)
                    maxArea = max(maxArea, 0.5 * abs(points[i][0] * points[j][1] + points[i][1] * points[k][0] +
                                                     points[j][0] * points[k][1] - points[i][0] * points[k][1] -
                                                     points[i][1] * points[j][0] - points[j][1] * points[k][0]));
        return maxArea;

    }
};

int main() {
    vector<vector<int>> points{{0, 0},
                               {0, 1},
                               {1, 0},
                               {0, 2},
                               {2, 0}};
    Solution solution;
    cout << solution.largestTriangleArea(points) << endl;
    return 0;
}

